package cn.yjr.fragment;


import com.nostra13.universalimageloader.core.ImageLoader;

import android.support.v4.app.Fragment;

/**
 * @author vector
 *
 */
public class FragmentFactory{
	public static Fragment getInstanceByIndex(int index, ImageLoader imageLoader) {  
	        Fragment fragment = null;  
	        switch (index) {  
	            case 1:  
	                fragment = new PersonalCenterFragment(imageLoader);  
	                break;  
	            case 2:  
	            	fragment = new ChatRoomFragment(); 
	                break;  
	            case 3:  
	                fragment = new PersonalCenterFragment(imageLoader);  
	                break;  
	            case 4:  
	                fragment = new PersonalCenterFragment(imageLoader);  
	                break;  
	        }  
	        return fragment;  
	    }  
}
